package com.ruoyi.crm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.crm.mapper.CrmBankMapper;
import com.ruoyi.crm.domain.CrmBank;
import com.ruoyi.crm.service.ICrmBankService;

/**
 * 银行参数Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-04
 */
@Service
public class CrmBankServiceImpl implements ICrmBankService 
{
    @Autowired
    private CrmBankMapper crmBankMapper;

    /**
     * 查询银行参数
     * 
     * @param bankId 银行参数主键
     * @return 银行参数
     */
    @Override
    public CrmBank selectCrmBankByBankId(Long bankId)
    {
        return crmBankMapper.selectCrmBankByBankId(bankId);
    }

    /**
     * 查询银行参数列表
     * 
     * @param crmBank 银行参数
     * @return 银行参数
     */
    @Override
    public List<CrmBank> selectCrmBankList(CrmBank crmBank)
    {
        return crmBankMapper.selectCrmBankList(crmBank);
    }

    /**
     * 新增银行参数
     * 
     * @param crmBank 银行参数
     * @return 结果
     */
    @Override
    public int insertCrmBank(CrmBank crmBank)
    {
        crmBank.setCreateTime(DateUtils.getNowDate());
        return crmBankMapper.insertCrmBank(crmBank);
    }

    /**
     * 修改银行参数
     * 
     * @param crmBank 银行参数
     * @return 结果
     */
    @Override
    public int updateCrmBank(CrmBank crmBank)
    {
        crmBank.setUpdateTime(DateUtils.getNowDate());
        return crmBankMapper.updateCrmBank(crmBank);
    }

    /**
     * 批量删除银行参数
     * 
     * @param bankIds 需要删除的银行参数主键
     * @return 结果
     */
    @Override
    public int deleteCrmBankByBankIds(Long[] bankIds)
    {
        return crmBankMapper.deleteCrmBankByBankIds(bankIds);
    }

    /**
     * 删除银行参数信息
     * 
     * @param bankId 银行参数主键
     * @return 结果
     */
    @Override
    public int deleteCrmBankByBankId(Long bankId)
    {
        return crmBankMapper.deleteCrmBankByBankId(bankId);
    }
}
